<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<button onclick="foo()">打开新页面</button>
		<script>
			function foo() {
				var dw = window.open();
				dw.document.open();
				dw.document.writeln(`
				<!DOCTYPE html >
					<html >
					<head >
					<meta charset = "utf-8" >
					<title >新页面 </title>
					 </head>
					  <body>
					<img src = "../第03章/yes.png" / >
					</body> 
					</html>
				`);
				dw.document.close();
			}
		</script>
	</body>
</html>